<?php if ($this->pageCount > 1): ?>
<div class="pagination">
    <ul>
    <?php if (isset($this->previous)): ?>
        <li class="prev"><a href="#" data-page="<?php echo $this->previous ?>">&laquo;</a></li>
    <?php else: ?>
        <li class="prev disabled"><a href="#">&laquo;</a></li>
    <?php endif; ?>

    <?php foreach ($this->pagesInRange as $page): ?>
        <?php if ($page == $this->current): ?>
            <li class="active"><a href="#"><?php echo $page ?></a></li>
        <?php else: ?>
            <li><a href="#" data-page="<?php echo $page ?>"><?php echo $page ?></a></li>
        <?php endif; ?>
    <?php endforeach; ?>

    <?php if (isset($this->next)): ?>
        <li class="next"><a href="#" data-page="<?php echo $this->next ?>">&raquo;</a></li>
    <?php else: ?>
        <li class="next disabled"><a href="#">&raquo;</a></li>
    <?php endif; ?>
    </ul>

    <ul class="pull-right">
        <li><a href="#">Total: <? echo $this->totalItemCount ?></a></li>
    </ul>
</div>
<?php endif; ?>